<script type="text/javascript">
	<!--

	    function getXmlHttpObject() {
	    //Initialise the XMLHttpRequest object.
	    var serverRequest = false;

	    // branch for native XMLHttpRequest object
	    if(window.XMLHttpRequest && !(window.ActiveXObject)) {
	    try {
	    request = new XMLHttpRequest();
	    } catch(e) {
	    request = false;
	    }
	    // branch for IE/Windows ActiveX (yuck)
	    } else if(window.ActiveXObject) {
	    try {
	    request = new ActiveXObject("Msxml2.XMLHTTP");
	    } catch(e) {
	    try {
	    request = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch(e) {
	    request = false;
	    }
	    }
	    }
	    return request;
	    }



	    function enhancePage(requestObject) {
	    // Enhance the page  if JS features are available
	    //If unavailable, leaving the page as is will preserve all needed functionality
	    if (requestObject) {
	    if(document.getElementById){
	    //We can use AJAX, and getElementById, prepare the page
	    var warningPara = document.getElementById('noJsMsg');
	    warningPara.style.display='none';
	    warningPara.parentNode.removeChild(warningPara);
	    //preload spinner
	    spinner = new Image();
	    logo = new Image();
	    spinner.src = '../templates/subSilver/images/wp-united-working.gif';
	    logo.src = document.getElementById('wpu-logo').src;
	    return true;
	    } else {
	    return false;
	    }
	    } else {
	    return false;
	    }
	    }

	    var testName;
	    function testUri() {
	    if (useAjax && !(serverRequestInProgress)) {
	    document.getElementById('wpu-logo').src = spinner.src;
	    // tests the entered URL via AJAX
	    document.getElementById('uriResultStr').firstChild.nodeValue = 'Testing...';
	    document.getElementById('uriResultStr').style.color = 'black';
	    var uriValue = document.getElementById('txtUri').value;

	    serverRequest.open("POST", '{S_WPWIZ_ACTION}', true);
	    // set data return event handler
	    testName = 'uri';
	    serverRequest.onreadystatechange = stateChange;
	    serverRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	    serverRequest.send('action=uriAjax&txt_Uri=' + escape(uriValue));
	    serverRequestInProgress = true;
	    }
	    return !useAjax;
	    }

	    function testPath() {
	    if (useAjax && !(serverRequestInProgress)) {
	    // tests the entered path via AJAX
	    document.getElementById('wpu-logo').src = spinner.src;
	    document.getElementById('pathResultStr').firstChild.nodeValue = 'Working...';
	    document.getElementById('pathResultStr').style.color = 'black';
	    var pathValue = document.getElementById('txtPath').value;
	    var uriValue = document.getElementById('txtUri').value;
	    serverRequest.open("POST", '{S_WPWIZ_ACTION}', true);
	    // set data return event handler
	    testName = 'path';
	    serverRequest.onreadystatechange = stateChange;
	    serverRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	    serverRequest.send('action=pathAjax&txt_Path=' + escape(pathValue) + '&txt_Uri=' + escape(uriValue));
	    serverRequestInProgress = true;
	    }
	    return !useAjax;
	    }

	    function stateChange() {
	    // only if request shows "loaded"
	    if (serverRequest.readyState == 4) {
	    // only if "OK"
	    if (serverRequest.status == 200) {

	    //Process result
	    var xmlPage = serverRequest.responseXML;
	    processResult(xmlPage);

	    } else {
	    alert('{WP_AJAX_TIMEOUT}\n\n' + serverRequest.statusText);
	    }
	    serverRequestInProgress = false;
	    //Hide spinner
	    document.getElementById('wpu-logo').src = logo.src;
	    } else {
	    //request is in progress.
	    }
	    }

	    function processResult(xmlDoc) {
	    if (xmlDoc.getElementsByTagName('result')) {
	    // parse the test results
	    var testSuccess = xmlDoc.getElementsByTagName('result').item(0).firstChild.data;
	    var testMsg = xmlDoc.getElementsByTagName('message').item(0).firstChild.data;
	    if ( xmlDoc.getElementsByTagName('info') ) {
	    fieldData = xmlDoc.getElementsByTagName('info').item(0).firstChild.data;
	    if ( fieldData != 'null' ) {
	    if ( testName == 'uri' ) {
	    document.getElementById('txtUri').value = fieldData;
	    } else if ( testName == 'path' ) {
	    document.getElementById('txtPath').value = fieldData;
	    }
	    }

	    }
	    // display the results
	    var resultShow = document.getElementById(testName + 'ResultStr')
	    // set result colour
	    if (testSuccess == "SUCCESS") {
	    resultShow.style.color = 'green';
	    } else if (testSuccess == "WARNING") {
	    resultShow.style.color = 'orange';
	    } else {
	    resultShow.style.color = 'red';
	    }
	    // set message
	    resultShow.firstChild.nodeValue = testMsg;
	    } else {
	    // can't understand the results
	    alert('{WP_AJAX_DATAERROR}');
	    }

	    }

	    function init () {
	    serverRequest = getXmlHttpObject();
	    useAjax = enhancePage(serverRequest);
	    }
	    var serverRequestInProgress = false;
	    var serverRequest; // = getXmlHttpObject();
	    var spinner;
	    var useAjax = true; // = enhancePage(serverRequest);
	    var logo;
	    window.onload = init;

	    //-->
</script>

<img id="wpu-logo" src="../templates/subSilver/images/wp-united-logo.gif" style="position: absolute; left: 2px; top: 2px; " />

<h1 style="text-align: center;">{L_WPWIZARD_H1} &ndash; {L_WPWIZARD_STEP}</h1>

<h2 style="text-align: center;">{L_WPWIZARD_S1B_TITLE}</h2>
<br />

<p class="gen">{L_WPWIZARD_S1B_EXPLAIN1}</p>

<!-- BEGIN switch_wp_error -->
<div style="background-color: red; border: 1px solid #ffffff; width = 80%; height = 100px; margin: 0px auto; vertical-align: center;"><p style="color: #ffffff; font-weight: bold;">{switch_wp_error.WP_ERROR_MSG}</p></div>
<!-- END switch_wp_error -->

<p class="gen" style="color: red;" id="noJsMsg">{L_WP_NO_ADV_JS}&nbsp;</p><br />


<form action="{S_WPWIZ_ACTION}" method="post">

	<!-- url table -->
	<table width="80%" cellpadding="4" cellspacing="1" border="0" align="center" class="forumline" style="margin-bottom: 10px;">
		<tr>
			<th class="thHead" colspan="2">{L_WPWIZARD_S1B_TH1}</th>
		</tr>
		<tr>
			<td class="row1"><strong>{L_WPURI_TITLE}</strong><br /><br /><span class="gensmall">{L_WPWIZURI_EXPLAIN}</span></td>
			<td class="row2"><input type="text" id="txtUri" name="txt_Uri" value="{S_WPURI}"  /></td>
		</tr>
		<tr>
			<td class="row1" colspan="2"><strong>{L_WPWIZURI_TEST_TITLE}</strong><br /><br /><span class="gensmall">{L_WPWIZURI_TEST_EXPLAIN}</span></td>
		</tr>
		<tr>
			<td class="row2" colspan="2" style="text-align: center;"><input onClick="return testUri();" type="submit" name="action" value="{L_WPURITEST}" class="mainoption" /></td>
		</tr>
		<tr>
			<td class="row2" colspan="2" id="uriResult"><p style="font-weight: bold;" id="uriResultStr">{L_WPWIZ_URITESTRESULT_NOAJAX}&nbsp;</p></td>

		</tr>

	</table>

	<!-- path table -->
	<table width="80%" cellpadding="4" cellspacing="1" border="0" align="center" class="forumline" style="margin-bottom: 10px;">
		<tr>
			<th class="thHead" colspan="2">{L_WPWIZARD_S1B_TH2}</th>
		</tr>
		<tr>
			<td class="row1" colspan="2"><strong>{L_WPPATH_TITLE}</strong><br /><br /><span class="gensmall">{L_WPWIZPATH_EXPLAIN1}<br /><br />{L_WPWIZPATH_EXPLAIN2}</span></td>
		</tr>
		<tr>
			<td class="row2" colspan="2" style="text-align: center;"><input onClick="return testPath();" type="submit" name="action" value="{L_WPPATHTEST}" class="mainoption" />{L_WPWIZPATH_EXPLAIN3}<input type="text" id="txtPath" name="txt_Path" value="{S_WPPATH}"  /></td>
		</tr>
		<tr>
			<td class="row2" colspan="2" id="pathResult"><p style="font-weight: bold;" id="pathResultStr">{L_WPWIZ_PATHTESTRESULT_NOAJAX}&nbsp;</p></td>

		</tr>

	</table>

	<!-- blog path table -->
	<table width="80%" cellpadding="4" cellspacing="1" border="0" align="center" class="forumline" style="margin-bottom: 10px;">
		<tr>
			<th class="thHead" colspan="2">{L_WPWIZARD_BLOGURI_TH}</th>
		</tr>
		<tr>
			<td class="row1"><strong>{L_WPWIZARD_BLOGURI_TITLE}</strong><br /><br /><span class="gensmall">{L_WPWIZARD_BLOGURI_EXPLAIN1}<br /><br />{L_WPWIZARD_BLOGURI_EXPLAIN2}<br /><br />{L_WPWIZARD_BLOGURI_EXPLAIN3}<br /><br />{L_WPWIZARD_BLOGURI_EXPLAIN4}<br /><br />{L_WPWIZARD_BLOGURI_EXPLAIN5}</span></td>
			<td class="row2"><input type="text" id="txtBlogUri" name="txt_BlogsUri" value="{S_BLOGSURI}"  /></td>
		</tr>
	</table>

	<!-- database sharing table
	     <table width="80%" cellpadding="4" cellspacing="1" border="0" align="center" class="forumline" style="margin-bottom: 10px;">
		     <tr>
			     <th class="thHead" colspan="2">{L_WPWIZARD_S1B_TH3}</th>
		     </tr>
		     <tr>
			     <td class="row1"><strong>{L_WPDBSHARE_TITLE}</strong><br /><br /><span class="gensmall">{L_WPDBSHARE_EXPLAIN1}<br /><br />{L_WPDBSHARE_EXPLAIN2}</span></td>
			     <td class="row2" style="width: 100px; min-width: 100px;"><input type="radio" id="DBShare" name="rad_DBShare" value="1" {S_WPDBSHARE_ENABLE} />{L_WP_YES}&nbsp;&nbsp;<input type="radio" name="rad_DBShare" value="0" {S_WPDBSHARE_DISABLE} />{L_WP_NO}</td>
		     </tr>
	     </table> -->

	     <!-- fwd/back buttons -->
	     <table width="80%" cellpadding="4" cellspacing="1" border="0" align="center" class="forumline">
		     <tr>
			     <td class="row1" style="width: 50%; text-align: right;"><input type="submit" name="Back" value="{L_WPBACK}" class="mainoption" /></td>
			     <td class="row1" style="text-align: left;"><input type="submit" name="Next" value="{L_WPNEXT}" class="mainoption" /></td>
		     </tr>
	     </table>

     </form>

     <!-- BEGIN switch_show_footer -->
     <br clear="both" />
     <!--
	 Please keep this copyright notice visible and unaltered.
	 -->
     <div align="center" class="copyright">{L_WP_FOOTER}</div>
<!-- END switch_show_footer -->